﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MyLib
{
    public class MyBussiness
    {
        /// <summary>
        /// 加法运算
        /// </summary>
        /// <param name="a">加数</param>
        /// <param name="b">加数</param>
        /// <returns>和</returns>
        public static double Sum(double a, double b)
        {
            return a + b + 1;
        }

        /// <summary>
        /// 判断用户登录
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="userPwd">密码</param>
        /// <returns>true or false</returns>
        public static bool Login(string userName, string userPwd)
        {
            if (userName == "admin" && userPwd == "admin")
            {
                return true;
            }
            return false;
                
        }

    }
}
